<?
//$save_type="MySQL";
session_start();

if($_SERVER['QUERY_STRING']){
        $params = decode_params();
	if($params){
                while(list($key,$value) = each($params)){
                        $$key  = $value;
                }

        }
        $params = "";
}

$dbh = get_master_connect();

if (!$dbh) {
//      echo "We are sorry but we cannot process your request at the moment<BR>";
				$errorMsg = translate('cannot_process_request');
				include_once('errorMsg.html');
        exit_now();
}
if (!$_SESSION['memberAuthenticated']) {
        header("Location: $baseURL/login.html");
        exit_now();
}
/*
if (session_exist($sid)) {
        session_start_();
} else {
        header("Location: $baseURL/login.html");
        exit_now();
}
*/

if ($_SESSION['memberAuthenticated'] != true) {
//        session_register_(memberAuthenticated, sid);
        $_SESSION['memberAuthenticated']= false;
//        session_save(sid);
}

/*
if (!$memberAuthenticated) {
                        $params[sid]=$sid;
                        $url="$baseURL/login.html";
                        header("Location: $url");
                        exit();
}
*/
if (!$memberAuthenticated) {
	header("Location: $baseURL/login.html");
	exit_now();
}

?>
